﻿using Dm.Domain.Repository.EntityRepositories;
using Dm.Domain.CrossCutting;
using Dm.Domain.Repository.EntityRepositories.ActiveRecord;

namespace Dm.Domain.Repository.Factories
{
    public class ContextFactory
    {
        private static BaseContext _baseContext;
        public static BaseContext Get()
        {
            return _baseContext ?? (_baseContext = new BaseContext());
        }

        private static IStudentRepository _studentRepository;
        public static IStudentRepository GetStudentRepository()
        {
            return _studentRepository ?? (_studentRepository = new StudentRepository());
            //return _studentRepository ?? (_studentRepository = new StudentActiveRecord());
        }
    }
}
